-module(sub_server_sup).
-behaviour(supervisor).
-define(SERVER,?MODULE).
-export([init/1]).
-export([start_link/0]).
start_link() ->
	supervisor:start_link({local,?SERVER},?MODULE,[]).
	
init([]) ->
	Children = [
		{tmsi_dict,{dict_server,start_link,[tmsi_dict]},permanent,2000,worker,[dict_server]},
		{imsi_dict,{dict_server,start_link,[imsi_dict]},permanent,2000,worker,[dict_server]},
		{guti_dict,{dict_server,start_link,[guti_dict]},permanent,2000,worker,[dict_server]},
		{ip_dict,{dict_server,start_link,[ip]},permanent,2000,worker,[dict_server]},
		{sub_dict,{sub_dict,start_link,[]},permanent,2000,worker,[sub_dict]},  %% obsolete later
		{cdr_event,{cdr_event,start_link,[]},permanent,2000,worker,[cdr_event]},
		{cdr_saver,{cdr_saver,start_link,[]},permanent,2000,worker,[cdr_saver]},
		{subscriber_sup,{subscriber_sup,start_link,[]},permanent,2000,supervisor,[subscriber_sup]}
		],
	RestartStrategy = {one_for_one,0,1},
	{ok,{RestartStrategy,Children}}.